// JavaScript Document
var Clocks = new Class({
  
  //implements  
  Implements: [Options],
  
  //options  
  options: {  
     element: 'clocks'  
  },
  
  //initialization  
  initialize: function(options) {  
  
    //set options  
    this.setOptions(options);
    //find clocks element
    this.clocks = $(this.options.element);
    //load clocks
//    if(this.clocks != null)
//    {
//      this.showTime();
//      this.showTime.periodical(1000,this);
//    }
       
  },
  
  showTime: function() {

     var date      = new Date();
     var timeValue = "   " + date.getHours()
     
     if(date.getMinutes() < 10){ 
        timeValue+=":0" + date.getMinutes();
     }
     else{
        timeValue+=":" + date.getMinutes();
     }
//     if (date.getSeconds() < 10){
//        timeValue+=":0" + date.getSeconds();
//     }
//     else{
//        timeValue+=":" + date.getSeconds();
//     }
     try{
        $(this.options.element).set('html', timeValue);
     }catch(e){}
  
  }
  
});
